@use '../common/var'as *;

.#{getNS('platform-frame ')} {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  display: flex;
  flex-direction: column;

  &>.#{getNS('platform-frame-header')} {
    height: 60px;
  }

  &>.#{getNS('platform-frame-body')} {
    flex: 1;
    overflow: hidden;
  }

  &>.#{getNS('platform-frame-footer')} {
    height: 30px;
  }
}

.#{getNS('platform-frame-body')} {
  display: flex;

  &>.#{getNS('platform-frame-sidebar')} {
    width: 220px;
    overflow: hidden auto;
  }

  &>.#{getNS('platform-frame-main')} {
    flex: 1;
    overflow: auto;
  }
}

.#{getNS('platform-frame-main')} {
  position: relative;
  background-color: getElVar(el-bg-color);

  &>.#{getNS('platform-frame-view')} {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;

    &>[id^=__qiankun_] {
      height: 100%;
    }

    &>iframe {
      width: 100%;
      height: 100%;
      border: none;
    }
  }
}

.#{getNS('platform-frame-header')} {
  border-bottom: 1px solid getElVar(border-color);


  .#{getNS('platform-frame-header-right')} {
    float: right;
  }
}

.#{getNS('platform-frame-header-right')} {
  padding: 0 10px;
  @extend %clearfix;

  .#{getNS('platform-frame-admin')} {
    float: left;
    display: flex;
    margin: 10px 10px;
    align-items: center;
    cursor: pointer;

    &>.#{getNS('platform-frame-el-avatar')} {
      margin-right: 10px;
    }
  }

  .#{getNS('platform-frame-theme')} {
    float: left;
    margin: 14px 10px;

    &>.#{getElNS('switch')} {
      &.is-checked {
        &>.#{getElNS('switch__core')} {
          background-color: getElVar(bg-color-mute);
          border-color: getElVar(border-color);
        }
      }
    }
  }
}

.#{getNS('platform-frame-footer')} {
  border-top: 1px solid getElVar(border-color);
}
